﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Jzy.Model.CRM
{
    public partial class CustomerInfo
    {
        public Func<int, List<CustomerContactInfo>> GetContacts;
        private List<CustomerContactInfo> _contacts;
        public List<CustomerContactInfo> Contacts
        {
            get
            {
                if (_contacts == null)
                {
                    _contacts = GetContacts(this.ID);
                }
                return _contacts;
            }
            set
            {
                _contacts = value;
            }
        }

        public Func<int, List<CustomerVisitInfo>> GetVisits;
        private List<CustomerVisitInfo> _visits;
        public List<CustomerVisitInfo> Visits
        {
            get
            {
                if (_visits == null)
                {
                    _visits = GetVisits(this.ID);
                }
                return _visits;
            }
            set
            {
                _visits = value;
            }
        }
    }
}
